<?php

use yii\db\Migration;

/**
 * Class m221116_105844_rbac_add_my_contract_permission
 */
class m221116_105844_rbac_add_my_contract_permission extends Migration
{
    /**
    * {@inheritdoc}
    */
   public function safeUp()
   {
       $auth = Yii::$app->authManager;

       $permissionCreate = $auth->createPermission('browseMyContract');
       $auth->add($permissionCreate);

   }

   /**
    * {@inheritdoc}
    */
   public function safeDown()
   {
       $auth = Yii::$app->authManager;

       $auth->remove($auth->getPermission('browseMyContract'));
   }
}
